<template>
  <div ref="ni" class="nima"></div>
</template>

<script>
export default {
  mounted() {
    this.initEchart();
  },
  methods: {
    initEchart() {
    let myChart = this.$echarts.init(this.$refs.ni)
    let option = {
  xAxis: {
    type: 'category',
    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      data: [150, 230, 224, 218, 135, 147, 260],
      type: 'line'
    }
  ]
};
      option && myChart.setOption(option)
    },
  },
};
</script>

<style scoped>
.nima {
  width: 100%;
  height: 420px;
  background: rgb(217, 220, 223);
}
</style>
